package cn.sourcespro.shiro.dao;

import cn.sourcespro.shiro.crudparams.PageInfo;
import cn.sourcespro.shiro.entity.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 用户 Mapper
 *
 * @author 张浩伟
 * @date 2018/07/12
 */
@Mapper
public interface UserMapper {
    
    int deleteByPrimaryKey(Long id);

    int insert(User record);

    User selectByPrimaryKey(Long id);

    List<User> selectAll(PageInfo pageInfo);

    int batchInsert(List<User> list);

    List<User> batchQueryByIds(List<Long> ids);

    List<User> batchQueryByUuids(List<String> uuids);

    int updateByPrimaryKey(User record);

    User findByUuid(String uuid);

    int selectCount(PageInfo pageInfo);

    int batchDeleteById(List<Long> ids);

    int batchDeleteByUuid(List<String> uuids);

    int deleteByUuid(String uuid);

    User findByName(String username);
}